-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
welcome back qr login #2060
welcome back qr login #2060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 15 changed files in this pull request and generated 1 comment.
Files not reviewed (10)
- src/Snap.Hutao/Snap.Hutao/ApiEndpoints.csv: Language not supported
- src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/UserView.xaml: Language not supported
- src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/QrTicketWrapper.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/HoyoPlayPassportClientOversea.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/IHoyoPlayPassportClient.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/Web/Request/Builder/EmptyContent.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/ViewModel/User/UserViewModel.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/Dialog/UserQRCodeDialog.xaml.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/Web/Response/KnownReturnCode.cs: Evaluated as low risk
- src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/HoyoPlayPassportClient.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Passport/QrLoginResult.cs:33
- The property name NeedRealperson should be corrected to NeedRealPerson.
public bool NeedRealperson { get; set; }
SortedDictionary<string, string> cookieMap = new() | ||
{ | ||
[STUID] = qrLoginResult.UserInfo.Aid, | ||
[STOKEN] = qrLoginResult.Tokens.Single(token => token.TokenType is 1).Token, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Single to get the token might throw an exception if there are multiple tokens of type 1. Ensure there is exactly one token of type 1 or handle multiple tokens gracefully.
[STOKEN] = qrLoginResult.Tokens.Single(token => token.TokenType is 1).Token, | |
[STOKEN] = qrLoginResult.Tokens.FirstOrDefault(token => token.TokenType is 1)?.Token, |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
DO NOT MERGE BEFORE HYP ENABLE THIS
Description
Related Issue
Checklist
develop
branch